//
//  CLTabPagerBarCell.m
//  Charles
//
//  Created by Leo on 2019/4/25.
//  Copyright © 2019 charles. All rights reserved.
//

#import "CLTabPagerBarCell.h"

@interface CLTabPagerBarCell ()

@property (nonatomic, weak) UILabel *titleLabel;

@end

@implementation CLTabPagerBarCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self addTabTitleLabel];
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super initWithCoder:aDecoder]) {
        [self addTabTitleLabel];
    }
    return self;
}

- (void)addTabTitleLabel {
    UILabel *titleLabel = [[UILabel alloc]init];
    titleLabel.font = [UIFont systemFontOfSize:15];
    titleLabel.textColor = [UIColor darkTextColor];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:titleLabel];
    _titleLabel = titleLabel;
}

+ (NSString *)cellIdentifier {
    return @"CLTabPagerBarCell";
}

- (void)layoutSubviews {
    [super layoutSubviews];
    _titleLabel.frame = self.contentView.bounds;
}

@end
